<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>类别管理</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/bootstrap.min.css" />
<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
		<jsp:include page="header.jsp"></jsp:include>
		
		<jsp:include page="navigation.jsp"></jsp:include>
		
		<!-- 商品详情 -->
		<div class="container-fluid">
			<div class="col-xs-4" style="height: 500px;">
				<img src="${pageContext.request.contextPath}/img/background.jpg" style="height: 400px;width: 400px;margin: 40px;">
			</div>
				
			<div class="col-xs-7" style="height: 500px;margin-top: 40px;">
				<h3 style="font-weight: bolder;color: #666666;">商品编号:${product.productNum}</h3>
				<h3 style="font-weight: bolder;color: #666666;">${product.productName}&nbsp;&nbsp;${product.productDesc}</h3>
				<form action="${pageContext.request.contextPath}/cart/addProductToCart.do" method="POST" class="form-inline">
					<input type="hidden" name="productId" value="${product.productId}">
					<input type="hidden" name="userId" value="${user.id}">
					<div class="form-group col-xs-12" style="margin-top:20px;">
						<label>商品库存</label>
						<input type="text" class="form-control" value="${product.stock}" readonly="readonly"/>
					</div>
					<div class="form-group col-xs-12"  style="margin-top:20px;"	>
						<label>商品折扣</label>
						<input type="text" class="form-control" value="${product.discount}" readonly="readonly"/>
					</div>
					<div class="form-group col-xs-12"  style="margin-top:20px;"	>
						<label>商品价格</label>
						<input type="text" class="form-control" value="${product.price}" readonly="readonly"/>
					</div>
					<div class="form-group col-xs-12"  style="margin-top:20px;"	>
						<label>购买数量</label>
						<input type="number" class="form-control" name="buyNum" value="1"/>
					</div>
					<button type="submit" class="btn btn-danger col-xs-offset-9 btn-lg" style="margin-top: 40px;">加入购物车</button>
				</form>
			</div>
		</div>
</body>
</html>